package com.thon.entity.project;

// Generated 2013-9-23 19:12:56 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.thon.entity.user.User;
import com.thon.entity.util.IdEntity;

/**
 * MeProjectRecommend generated by hbm2java
 */
@Entity
@Table(name = "project_recommends")
@JsonIgnoreProperties(ignoreUnknown=true)
public class ProjectRecommend extends IdEntity {

	private static final long serialVersionUID = 1979509101960282210L;
	private Project project;
	private User user;
	private Date createdDate;

	public ProjectRecommend() {
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "project_id", nullable = false)
	@JsonIgnoreProperties( value={"hibernateLazyInitializer","handler"})
	public Project getProject() {
		return this.project;
	}

	public void setProject(Project project) {
		this.project = project;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	@JsonIgnoreProperties( value={"hibernateLazyInitializer","handler"})
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
}
